' T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%
 
 ' Q%          N a m e :   W i n c h _ 0 3 . t x t                                     D a t e :   2 4   S e t   2 0 2 2   Q%
 
 ' Q%      A u t h o r :   L e o n a r d o                                                                                 Q%
 
 ' Q%        S c o p e :   T e s t   a l l   t h e   f u n c t i o n a l i t y   o f   w i n c h                           Q%
 
 ' `%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%c%
 
 ' Q%H a r d w a r e :   S t a n d a r d   F e e T e c h   S T S 3 2 1 5                                                   Q%
 
 ' _% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %b%
 
 ' Q%        N o t e :   F e e T e c h   a t   7 . 5 V                                                                     Q%
 
 ' Q%                                                                                                                      Q%
 
 ' Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%
 
 O p t i o n   S p e e d   9 
 
 B e e p   " 2 5 0 0   2 0 ,   1 5 0 0   1 0 0 " 
 
 L o a d   i m a g e s \ W i n c h . j p g 
 
 
 
 '   T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%
 
 '   Q%  S L O T   T E X T   f o r   C O M M A N D S   a n d   R E S P O N S E S               Q%
 
 '   Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%
 
 V a r i a b l e   N u m e r i c   S l o t _ C o m m a n d s T o M o t o r s       =   5 0 
 
 V a r i a b l e   N u m e r i c   S l o t _ C o m m a n d s T o C o b o t         =   5 1 
 
 V a r i a b l e   N u m e r i c   S l o t _ R e s p o n s e s F r o m C o b o t   =   5 2 
 
 V a r i a b l e   N u m e r i c   S l o t _ E x t e r n a l C o m m a n d s       =   5 3 
 
 
 
 '   T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%  %      %  %%%%  %%%%%
 
 '   Q%  V A R I A B L E   I N I T I A L I Z A T I O N S   &   A S S I G N E M E N T S         Q%  %      %  %%%%  %%%%%
 
 '   Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%    %%%    %    %  %    %%
 
 V a r i a b l e   N u m e r i c   S l o t _ E n c o d e r D a t a     =     1 
 
 V a r i a b l e   N u m e r i c   S l o t _ E n c o d e r B t n       =   1 0 
 
 
 
 V a r i a b l e   N u m e r i c   S l o t _ A n a l o g _ X           =     4 
 
 V a r i a b l e   N u m e r i c   S l o t _ A n a l o g _ Y           =     5 
 
 
 
 V a r i a b l e   N u m e r i c   S l o t _ L e d R                   =     7 
 
 V a r i a b l e   N u m e r i c   S l o t _ L e d G                   =     8 
 
 V a r i a b l e   N u m e r i c   S l o t _ L e d B                   =     9 
 
 
 
 V a r i a b l e   N u m e r i c   S l o t _ M 1                       =   1 0 1 
 
 
 
 V a r i a b l e   N u m e r i c   S l o t _ S i g n a l S c o p e     =   1 3 
 
 V a r i a b l e   N u m e r i c   S l o t _ R S 4 8 5 _ F P S         =   5 6 
 
 
 
 '   T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%  %%%%  %    %  %%%%%
 
 '   Q%  B U T T O N S                                                                         Q%  %%%%  %    %      %
 
 '   Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%  %%%%  %%%%      %
 
 B u t t o n   1   L a b e l   E x e c C o b o t 
 
 B u t t o n   E x e c C o b o t     T e x t   " E x e c   C o b o t " 
 
 B u t t o n   E x e c C o b o t     C o l o r   G r e e n Y e l l o w 
 
 
 
 B u t t o n   2   L a b e l   S t o p C o b o t 
 
 B u t t o n   S t o p C o b o t     T e x t   " S t o p   C o b o t " 
 
 B u t t o n   S t o p C o b o t     C o l o r   Y e l l o w 
 
 
 
 B u t t o n   4   L a b e l   S e t C e n t e r H e r e 
 
 B u t t o n   S e t C e n t e r H e r e   T e x t   " S e t   C e n t e r   H e r e " 
 
 B u t t o n   S e t C e n t e r H e r e   C o l o r   O r a n g e 
 
 
 
 B u t t o n   5   L a b e l   C a l i b r a t e T o Z e r o 
 
 B u t t o n   C a l i b r a t e T o Z e r o     T e x t   " C a l i b r a t e   t o   Z e r o " 
 
 B u t t o n   C a l i b r a t e T o Z e r o     C o l o r   O r a n g e 
 
 
 
 ' B u t t o n   6   L a b e l   C a l i b r a t e M o t o r 1 T o 1 8 0 
 
 ' B u t t o n   C a l i b r a t e M o t o r 1 T o 1 8 0     T e x t   " E x a m p l e :   C a l i b r a t e "   +   C R L F   +   " M o t o r 1   T o   1 8 0 " 
 
 ' B u t t o n   C a l i b r a t e M o t o r 1 T o 1 8 0     C o l o r   O r a n g e 
 
 
 
 B u t t o n     7   L a b e l   C u r r e n t M e t e r 
 
 
 
 B u t t o n     8   L a b e l   " M o t o r T e m p " 
 
 B u t t o n   M o t o r T e m p   C o l o r   S a l m o n 
 
 
 
 B u t t o n   1 0   L a b e l   K n o b 
 
 B u t t o n   K n o b   T e x t   " K n o b " 
 
 B u t t o n   K n o b   C o l o r   A q u a m a r i n e 
 
 
 
 B u t t o n   1 5   L a b e l   C l o s e A l l 
 
 B u t t o n   C l o s e A l l     T e x t   " C L O S E   A L L " 
 
 B u t t o n   C l o s e A l l     C o l o r   R e d 
 
 
 
 
 
 '   T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%  %      %%%%  %%%%  %%%%
 
 '   Q%  L O A D   A P P S                                                                     Q%  %      %    %  %%%%  %    %
 
 '   Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%  %%%  %%%%  %    %  %%%%
 
 
 
 L o a d   T h e r e m i n o _ M o t o r s . e x e 
 
 W a i t A p p l i c a t i o n s S t a r t e d 
 
 '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 '     M O T O R S   m u s t   b e   a c t i v e   b e f o r e   C o b o t 
 
 '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 L o a d   T h e r e m i n o _ H A L . e x e 
 
 L o a d   T h e r e m i n o _ S l o t V i e w e r . e x e 
 
 L o a d   T h e r e m i n o _ S l o t V i e w e r _ M 1 . e x e 
 
 L o a d   T h e r e m i n o _ S l o t V i e w e r _ S t r i n g s . e x e 
 
 L o a d   T h e r e m i n o _ S i g n a l S c o p e . e x e 
 
 L o a d   T h e r e m i n o _ C o b o t . e x e 
 
 W a i t A p p l i c a t i o n s S t a r t e d 
 
 L o a d   H i d e 
 
 
 
 '   - - - - - - - - - - - - - - - - - - - - - - - - -   G O T O   H O M E   -   C o m m a n d   t o   C o b o t 
 
 ' W a i t C o b o t R e a d y 
 
 ' S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( G o t o H o m e ) 
 
 
 
 
 
 '   T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%  %      %%%%  %%%%  %%%%
 
 '   Q%  L O O P                                                                               Q%  %      %    %  %    %  %%%%
 
 '   Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%  %%%  %%%%  %%%%  %
 
 L a b e l   L o o p 
 
 	 C u r r e n t M e t e r 
 
 G o t o   L o o p 
 
 S t o p 
 
 
 
 '   T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%
 
 '   Q%  E N A B L E / D I S A B L E   B U T T O N S                                           Q%
 
 '   Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%
 
 L a b e l   E n a b l e A l l B u t t o n s 
 
 	 F o r   v 1   =   1   T o   1 6 
 
 	 	 B u t t o n   v 1   E n a b l e d 
 
 	 N e x t 
 
 R e t u r n 
 
 
 
 L a b e l   D i s a b l e A l l B u t t o n s 
 
 	 F o r   v 1   =   1   T o   1 6 
 
 	 	 B u t t o n   v 1   D i s a b l e d 
 
 	 N e x t 
 
 R e t u r n 
 
 
 
 
 
 '   T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%
 
 '   Q%    W A I T   C O B O T   R E A D Y                                                     Q%
 
 '   Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%
 
 L a b e l   W a i t C o b o t R e a d y 
 
 	 V a r i a b l e   N u m e r i c   W C R 1 
 
 	 F o r   W C R 1   =   1   T o   I n f i n i t y 
 
 	 	 W a i t   S e c o n d s   0 . 0 5 
 
 	 	 I f   S l o t T e x t ( S l o t _ R e s p o n s e s F r o m C o b o t )   =   " R e a d y " 
 
 	 	 	 E x i t 
 
 	 	 E n d I f 
 
 	 N e x t 
 
 R e t u r n 
 
 
 
 '   T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%
 
 '   Q%    W A I T   A P P S   S T A R T E D                                                   Q%
 
 '   Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%
 
 L a b e l   W a i t A p p l i c a t i o n s S t a r t e d 
 
 	 S l o t ( S l o t _ R S 4 8 5 _ F P S )   =   0 
 
 	 W a i t   S l o t ( S l o t _ R S 4 8 5 _ F P S )   >   1 0 
 
 	 W a i t   S e c o n d s   0 . 1 
 
 R e t u r n 
 
 
 
 
 
 
 
 '   T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%  %%%%  %%%%%  %%%%  %%%%
 
 '   Q%  S T O P   E V E N T   ( w h e n   p r e s s i n g   s t o p   b u t t o n )           Q%  %%%%      %      %    %  %%%%
 
 '   Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%  %%%%      %      %%%%  %
 
 
 
 L a b e l   E v e n t S t o p 
 
 	 S t o p C o b o t A n d G o t o H o m e 
 
 E n d 
 
 
 
 L a b e l   S t o p C o b o t A n d G o t o H o m e 
 
 	 S t o p C o b o t 
 
 	 W a i t M o t o r s N o t M o v i n g 
 
 	 G o t o S a f e P o s i t i o n 
 
 R e t u r n 
 
 
 
 L a b e l   G o t o S a f e P o s i t i o n 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( G o t o H o m e ) 
 
 	 W a i t M o t o r s N o t M o v i n g 
 
 R e t u r n 
 
 
 
 L a b e l   W a i t M o t o r s N o t M o v i n g 
 
 	 V a r i a b l e   N u m e r i c   W M N 1 
 
 	 V a r i a b l e   N u m e r i c   W M N 2 
 
 	 W a i t   S e c o n d s   0 . 1 
 
 	 F o r   W M N 1   =   0   T o   I n f i n i t y 
 
 	 	 W M N 2   =   S l o t ( S l o t _ M 1   +   6 ) 
 
 	 	 ' W M N 2   =   W M N 2   +   S l o t ( S l o t _ M 2   +   6 ) 
 
 	 	 ' W M N 2   =   W M N 2   +   S l o t ( S l o t _ M 3   +   6 ) 
 
 	 	 I f   W M N 2   =   0 
 
 	 	 	 E x i t   F o r 
 
 	 	 E n d I f 
 
 	 N e x t 
 
 R e t u r n 
 
 
 
 '   T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%  %%%  %      %%%%  %%%%  %%%%
 
 '   Q%  C L O S E   A L L             ( w h e n   p r e s s i n g   X   o n   f o r m )       Q%  %      %      %    %  %%%%  %%%
 
 '   Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%  %%%  %%%  %%%%  %%%%  %%%%
 
 L a b e l   C l o s e A l l 
 
 	 S t o p C o b o t A n d G o t o H o m e 
 
 	 L o a d   C l o s e A l l 
 
 E n d 
 
 
 
 
 
 '   T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%    %%%%  %%%%  %%  %%      %%%    %%%%  %%%%  %%%
 
 '   Q%    C O M M A N D S   F R O M   C O B O T         Q%    %        %    %  %  %  %      %%      %        %    %  %%%%
 
 '   Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%    %%%%  %%%%  %      %  %  %    %  %%%%  %%%%  %%%%
 
 
 
 L a b e l   E v e n t _ E x t e r n a l C o m m a n d s 
 
 	 '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   D o   n o t   p r i n t   l i n e s   c o n t a i n i n g   ' ' 
 
 	 P r i n t   "   E x e c :   "   +   C o m m a n d T e x t   +   C R L F 
 
 	 '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 	 S e l e c t   C o m m a n d T e x t 
 
 	 	 	 '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   A C T I O N S 
 
 	 	 C a s e   " B e e p " 
 
 	 	 	 B e e p   8 8 0 - 1 0 0 
 
 	 	 	 C l e a r C o m m a n d 
 
 	 	 C a s e   " P a u s e " 
 
 	 	 	 W a i t   S e c o n d s   G e t S e p a r a t e d S t r i n g ( C o m m a n d T e x t ,   1 ) 
 
 	 	 	 C l e a r C o m m a n d 
 
 	 	 ' C a s e   " S t a r t P u m p " 
 
 	 	 ' 	 S t a r t P u m p 
 
 	 	 ' 	 C l e a r C o m m a n d 
 
 	 	 ' C a s e   " S t o p P u m p " 
 
 	 	 ' 	 S t o p P u m p 
 
 	 	 ' 	 C l e a r C o m m a n d 
 
 	 	 C a s e E l s e 
 
 	 	 	 C o n t r o l s   O p e n T e x t B o x 
 
 	 	 	 P r i n t   C R L F   +   "   U n r e c o g n i z e d   c o m m a n d :   "   +   C o m m a n d T e x t   +   C R L F 
 
 	 	 	 B e e p 
 
 	 	 	 C l e a r C o m m a n d 
 
 	 	 	 S t o p 	 	 	 	 	 	 	 	 ' 
 
 	 E n d S e l e c t 
 
 R e t u r n 
 
 
 
 L a b e l   C l e a r C o m m a n d 
 
 	 S l o t T e x t ( S l o t _ E x t e r n a l C o m m a n d s )   =   " " 
 
 R e t u r n 
 
 
 
 
 
 '   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 '     S E N D   C O M M A N D   ( d e f a u l t   t i m e o u t   =   0 . 5   S e c ) 
 
 '   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 L a b e l   S e n d C o m m a n d 
 
 	 V a r i a b l e   N u m e r i c   S C 1               ' < - -   P a r a m e t e r   D e s t i n a t . - S l o t 
 
 	 V a r i a b l e   S t r i n g     S C 2               ' < - -   P a r a m e t e r   C o m m a n d - S t r i n g 
 
 	 V a r i a b l e   N u m e r i c   S C 3   =   0 . 5   ' < - -   T h e   t i m e o u t   i n   s e c o n d s 
 
 	 V a r i a b l e   N u m e r i c   S C 4 
 
 	 S l o t T e x t   S C 1   =   S C 2 
 
 	 F o r   S C 4   =   0 . 1   T o   S C 3   S t e p   0 . 1 
 
 	 	 I f   S l o t T e x t ( S C 1 )   =   " " 
 
 	 	 	 E x i t 
 
 	 	 E n d I f 
 
 	 	 W a i t   S e c o n d s   0 . 1 
 
 	 N e x t 
 
 R e t u r n 
 
 
 
 
 
 '   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 '     C O M M A N D S   t o   C o b o t 
 
 '   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 L a b e l   E x e c C o b o t 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( E n a b l e R e p e a t ) 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( S e l e c t L i n e   1 ) 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( S t a r t E x e c u t i o n ) 
 
 R e t u r n 
 
 
 
 L a b e l   S t o p C o b o t 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( S t o p E x e c u t i o n ) 
 
 R e t u r n 
 
 
 
 '   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 '     C A L I B R A T I O N   C O M M A N D S   t o   M o t o r s   a n d   C o b o t 
 
 '   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 L a b e l   S e t C e n t e r H e r e 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o M o t o r s ) ( " R e s e t A l l C a l i b r a t i o n V a l u e s " ) 
 
 	 W a i t   S e c o n d s   0 . 5 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o M o t o r s ) ( " R e s e t A l l M u l t i t u r n V a l u e s " ) 
 
 	 W a i t   S e c o n d s   0 . 5 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t )   ( " S e t A l l M o t o r s C e n t e r H e r e " ) 
 
 	 W a i t   S e c o n d s   0 . 5 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t )   ( " C o p y P o s i t i o n s T o D e s t i n a t i o n s " ) 
 
 R e t u r n 
 
 
 
 L a b e l   C a l i b r a t e T o Z e r o 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o M o t o r s ) ( " C a l i b r a t e   M o t o r   1   T o   0 " ) 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o M o t o r s ) ( " C a l i b r a t e   M o t o r   2   T o   0 " ) 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o M o t o r s ) ( " C a l i b r a t e   M o t o r   3   T o   0 " ) 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o M o t o r s ) ( " C a l i b r a t e   M o t o r   4   T o   0 " ) 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o M o t o r s ) ( " C a l i b r a t e   M o t o r   5   T o   0 " ) 
 
 	 ' S e n d C o m m a n d ( S l o t _ C o m m a n d s T o M o t o r s ) ( " C a l i b r a t e   M o t o r   6   T o   0 " ) 
 
 	 W a i t   S e c o n d s   0 . 5 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t )   ( " C o p y P o s i t i o n s T o D e s t i n a t i o n s " ) 
 
 R e t u r n 
 
 
 
 L a b e l   C a l i b r a t e M o t o r 1 T o 1 8 0 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o M o t o r s ) ( " C a l i b r a t e   M o t o r   1   T o   1 8 0 " ) 
 
 	 S e n d C o m m a n d ( S l o t _ C o m m a n d s T o C o b o t ) ( " C o p y P o s i t i o n s T o D e s t i n a t i o n s " ) 
 
 R e t u r n 
 
 
 
 
 
 '   T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%  %%%%  %    %  %%%
 
 '   Q%    S   U   B   R   O   U   T   I   N   E       A   R   E   A                           Q%  %%%%  %    %  %%%%
 
 '   Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%  %%%%  %%%%  %%%%
 
 L a b e l   C u r r e n t M e t e r 
 
 	 V a r i a b l e   N u m e r i c   m A 
 
 	 m A   =   S l o t ( 1 0 8 )   +   S l o t ( 2 0 8 )   +   S l o t   ( 3 0 8 )   '   < - -   M o t o r s   s l o t s 
 
 	 m A   =   F i l t e r L P ( m A ,   0 . 1 ,   1 )   ' < - -   F i l t e r   0 . 5   s e c o n d s   /   1   p o l e 
 
 	 B u t t o n   C u r r e n t M e t e r   T e x t   S t r ( m A ,   " 0   m A " ) 
 
 	 ' S l o t   9 9 9   =   m A 
 
 R e t u r n 
 
 
 
 L a b e l   K n o b 
 
 	 I f   G r a n u l a r i t y   < >   0 
 
 	 	 G r a n u l a r i t y   =   0 
 
 	 E l s e 
 
 	 	 B l u e O n 
 
 	 	 D i s a b l e A l l B u t t o n s 
 
 	 	 B u t t o n   K n o b   E n a b l e d 
 
 	 	 v 7 3   =   S l o t ( S l o t _ E n c o d e r D a t a ) 
 
 	 	 G r a n u l a r i t y   =   1 
 
 	 	 F o r   v 1   =   1   T o   I n f i n i t y 
 
 	 	 	 S l o t ( 1 0 1 )   =   ( v 7 3   -   S l o t ( S l o t _ E n c o d e r D a t a ) )   *   G r a n u l a r i t y 
 
 	 	 	 S e t G r a n u l a r i t y 
 
 	 	 	 I f   G r a n u l a r i t y   =   0 
 
 	 	 	 	 E x i t 
 
 	 	 	 E n d I f 
 
 	 	 N e x t 
 
 	 	 E n a b l e A l l B u t t o n s 
 
 	 E n d I f 
 
 R e t u r n 
 
 
 
 V a r i a b l e   N u m e r i c   G r a n u l a r i t y   =   0 
 
 L a b e l   S e t G r a n u l a r i t y 
 
 	 V a r i a b l e   N u m e r i c   S G 1 
 
 	 V a r i a b l e   N u m e r i c   S G 2   =   S l o t ( S l o t _ E n c o d e r B t n ) 
 
 	 I f   S G 1   < =   5 0 0   A n d   S G 2   >   5 0 0 
 
 	 	 I f   G r a n u l a r i t y   =   1 
 
 	 	 	 B u t t o n   K n o b   C o l o r   F l a s h i n g 6   L i g h t C y a n   A q u a 
 
 	 	 	 G r a n u l a r i t y   =   0 . 1 
 
 	 	 E l s e 
 
 	 	 	 B u t t o n   K n o b   C o l o r   F l a s h i n g 6   L i g h t C y a n   G r e e n 
 
 	 	 	 G r a n u l a r i t y   =   1 
 
 	 	 E n d I f 
 
 	 E n d I f 
 
 	 S G 1   =   S G 2 
 
 R e t u r n 
 
 
 
 '   T%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%  %      %%%  %%%
 
 '   Q%  L E D   C O L O R S                                                                   Q%  %      %%    %    %
 
 '   Z%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%  %%%  %%%  %%%%
 
 L a b e l   R e d O n 
 
 	 S l o t   S l o t _ L e d R   =   1 0 0 0 
 
 	 S l o t   S l o t _ L e d G   =   0 
 
 	 S l o t   S l o t _ L e d B   =   0 
 
 R e t u r n 
 
 
 
 L a b e l   M a g e n t a O n 
 
 	 S l o t   S l o t _ L e d R   =   1 0 0 0 
 
 	 S l o t   S l o t _ L e d G   =   0 
 
 	 S l o t   S l o t _ L e d B   =   1 0 0 0 
 
 R e t u r n 
 
 
 
 L a b e l   Y e l l o w O n 
 
 	 S l o t   S l o t _ L e d R   =   9 0 0 
 
 	 S l o t   S l o t _ L e d G   =   4 0 0 
 
 	 S l o t   S l o t _ L e d B   =   0 
 
 R e t u r n 
 
 
 
 L a b e l   G r e e n O n 
 
 	 S l o t   S l o t _ L e d R   =   0 
 
 	 S l o t   S l o t _ L e d G   =   1 0 0 0 
 
 	 S l o t   S l o t _ L e d B   =   0 
 
 R e t u r n 
 
 
 
 L a b e l   B l u e O n 
 
 	 S l o t   S l o t _ L e d R   =   0 
 
 	 S l o t   S l o t _ L e d G   =   0 
 
 	 S l o t   S l o t _ L e d B   =   1 0 0 0 
 
 R e t u r n 
 
 
 
 L a b e l   W h i t e O n 
 
 	 S l o t   S l o t _ L e d R   =   1 0 0 0 
 
 	 S l o t   S l o t _ L e d G   =   1 0 0 0 
 
 	 S l o t   S l o t _ L e d B   =   1 0 0 0 
 
 R e t u r n 
 
 
 
 L a b e l   R g b O f f 
 
 	 S l o t   S l o t _ L e d R   =   0 
 
 	 S l o t   S l o t _ L e d G   =   0 
 
 	 S l o t   S l o t _ L e d B   =   0 
 
 R e t u r n 
 
 
 
 L a b e l   R e d B l i n k 
 
 	 R e d O n 
 
 	 W h i t e O n 
 
 R e t u r n 
 
 
 
 
 
 ' W A T C H   G r a n u l a r i t y 
 
 